home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / UTILITY / DO1002.ARJ / RD.SCR < prev    next >
Text File  |  1991-12-13  |  2KB  |  67 lines

  1. .pg wi full clr cy
  2.     COMMAND NAME»gray«: »%t« RemoveDir »ye«
  3.  
  4.     /RD {directory} [N]
  5. /cw
  6.     The »%t«RemoveDir»#« command is the equivalent of DOS' »gr«RMDIR»#« command.
  7.     Any variables in »cy«{directory}»#« are expanded before the command
  8.     is executed. »cy«{directory}»wh« must be a valid DOS sub-directory
  9.     after the expansion of any variables.»#«
  10. .pg clr
  11.  
  12.     After the execution of the »%t«RemoveDir»#« command, »%t«DO»#« branches to
  13.     one of two labels:
  14.  
  15.     »ma«:RDOK»#«     The »%t«RemoveDir»#« command was successfully executed.
  16.     »ma«:RDERROR»#«  The »%t«RemoveDir»#« command was »re«NOT»#« successfully executed.
  17.               That is »%t«DO»#« was unable to create the indicated
  18.               directory.
  19.  
  20.     If the "»ye«N»#«" token is included, the command will »+re«NOT»#« branch to the
  21.     labels, but will continue on the next line of the script regardless
  22.     of the outcome.
  23.  
  24. .pg clr
  25.                ┌──────────────────────────────────┐
  26.                │ »ye«Test of MD/RD directory creation»#« │
  27.                └──────────────────────────────────┘
  28.  
  29.   This short demo will use the »%t«/MD»#« and »%t«/RD»#« commands to create and
  30.   remove a directory. If any command encounters an error, the
  31.   demo will terminate. Press »bo«<enter>»#« to execute each line after
  32.   it is displayed.
  33.  
  34. |/md temp
  35. :mdOK
  36. |/cd temp
  37. :CDOK
  38. |/gd Directory
  39.  
  40. We are in %directory
  41. |/cd ..
  42. :CDOK
  43. |/gd Directory
  44.  
  45.   We are now in %directory
  46. |/rd temp
  47. :RDOK
  48.   Directory removed
  49. |/cd temp
  50. :CDOK
  51. OOPS! there's some problem here. Directory should not be accessable!
  52. /GOTO End
  53. :mderror
  54. /GOSUB DispError "Creating Directory with /MD"
  55. /GOTO End
  56. :cderror
  57. /GOSUB DispError "Changing directory with /CD"
  58. /GOTO End
  59. :rderror
  60. /GOSUB DispError "Removing directory with /RD"
  61. /GOTO End
  62. :DispError
  63.   ERROR: %DispError01
  64. /RETURN
  65. :END
  66. /ENDEXEC CLEAR
  67.